﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{-include file="`$__PHY_WEB``$__DIR_ADM`/block/meta.tpl"-}
<title>用户管理 - 后台</title>
</head>

<body>
<div class="sAll">

{-include file="`$__PHY_WEB``$__DIR_ADM`/block/header.tpl"-}
{-php-}include(__PHY_WEB.__DIR_ADM."/block/menu.php");{-/php-}
{-include file="`$__PHY_WEB``$__DIR_ADM`/block/menu.tpl" uL=$rNav-}

<div class="sL">
	<div class="sW main">
<!-- <main> -->
{- if $sMsg -}{- include file="`$__PHY_WEB``$__DIR_ADM`/block/message.tpl" -}{- /if -}

{- if 'list'==$sAction -}
<div class="sL list">
	<p>列表</p>
	<table>
		<tr class="capt">
			<td>ID</td>
			<td>Email</td>
			<td>昵称</td>
			<td>艺术家信息</td>
			<td>&nbsp;</td>
		</tr>
{-section name=i loop=$rList-}
		<tr>
			<td>{-$rList[i].id|escape:html-}</td>
			<td>{-$rList[i].email|escape:html-}</td>
			<td>{-$rList[i].nick|escape:html-}</td>
			<td>{-if $rList[i].role_artist-}{-$rList[i].sign|escape:html-} / {-$rList[i].sign_en|escape:html-}
				{-else-}<i style="color:gray;">普通用户</i>
			{-/if-}</td>
			<td><a href="?action=edit&id={-$rList[i].id-}">修改</a></td>
		</tr>
{-/section-}
		<tr class="capt">
			<td>ID</td>
			<td>Email</td>
			<td>昵称</td>
			<td>艺术家信息</td>
			<td>&nbsp;</td>
		</tr>
	</table>
	<div>
		<span>翻页条：</span>
{-html_pager max=$rPager.Max page=$rPager.Num
	link="<a href=\"?`$rPager.Bse`&`$rPager.Req`={X}\">{X}</a>"
	text="{X}"
-}
		<span>每页{-$rPager.Sze-}条</span>
	</div>
</div>
{- elseif 'edit'==$sAction -}
<div class="sL edit">
	<p>修改</p>
	<form method="post" action="?" enctype="multipart/form-data">
	<table>
		<input type="hidden" name="id" value="{-$rOne.id|escape:html-}" />
		<tr>
			<td class="indc">注册时间：</td>
			<td>{-$rOne.time_added|escape:html-} &nbsp; &nbsp; 最近登录时间：{-$rOne.time_lastlogin|escape:html-}</td>
		</tr>
		<tr>
			<td class="indc">Email：</td>
			<td><input type="text" name="email" value="{-$rOne.email|escape:html-}" />（用户邮箱）</td>
		</tr>
		<tr>
			<td class="indc">昵称：</td>
			<td><input type="text" name="nick" value="{-$rOne.nick|escape:html-}" />（用户昵称）</td>
		</tr>
		<tr>
			<td class="indc">头像：</td>
			<td><input type="file" name="thumb" value="" />{-if $rOne.thumb-}<br />
				<img src="{-$rOne.thumb|uUser_thumb:$rOne.id:'220x220.jpg'-}" />
				<img src="{-$rOne.thumb|uUser_thumb:$rOne.id:'156x156.jpg'-}" />{-/if-}
			</td>
		</tr>
		<tr>
			<td class="indc">是艺术家：</td>
			<td><input type="radio" name="role_artist" value="0"{-if 0==$rOne.role_artist-} checked="checked"{-/if-} />否 &nbsp;
				<input type="radio" name="role_artist" value="1"{-if 1==$rOne.role_artist-} checked="checked"{-/if-} />是 &nbsp;
			</td>
		</tr>
		<tr>
			<td class="indc">艺名：</td>
			<td><input type="text" name="sign" value="{-$rOne.sign|escape:html-}" size="10" /> &nbsp;
				英 <input type="text" name="sign_en" value="{-$rOne.sign_en|escape:html-}" size="20" />
			</td>
		</tr>
		<tr>
			<td class="indc">展示地址：</td>
			<td><textarea name="demo" class="long">{-$rOne.demo|escape:html-}</textarea></td>
		</tr>
		<tr>
			<td class="indc">简介：</td>
			<td><textarea name="description" class="long">{-$rOne.description|escape:html-}</textarea><br />
				英<textarea name="description_en" class="long">{-$rOne.description_en|escape:html-}</textarea>
			</td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				<input type="submit" name="action" value="update" />
				<input type="submit" name="action" value="cancel" />
			</td>
		</tr>
	</table>
	</form>
</div>
{- else -}
sth wrong: no $sAction.
{- /if -}

<!-- </main> -->
	</div>
</div>

{- include file="`$__PHY_WEB``$__DIR_ADM`/block/footer.tpl" -}

</div><!-- end all -->
</body>
</html>
